<?

/** 
  +---------------------------------------------------------- 
 * 功能：计算两个日期相差的天数 
  +---------------------------------------------------------- 
 * @param  date     $startdate 起始日期 
 * @param  date     $enddate 截止日期日期 
  +---------------------------------------------------------- 
 * @return array              
  +---------------------------------------------------------- 
 */
 
 
function count_days($startdate,$enddate) { 
    
 
$d1 = strtotime($startdate);
 
$d2 = strtotime($enddate);
 
$Days = round(($d2-$d1)/3600/24);

return $Days;
 
 
}
?>